#include "cIntegrator.h"
//*****************************************************************//
//*****************************************************************//
int cState::reset()
{
	x = 0;
	y = 0;
	z = 0;
	vx = 0;
	vy = 0;
	vz = 0;

	theta = 0;
	phi = 0;
	psi = 0;

	mass = 0;
	Ixx = 0;
	Iyy = 0;
	Izz = 0;
	Ixz = 0;
	Ixy = 0;
	Iyz = 0;

	att.set_rotation_deg(0, 0, 0);

	return 0;

}
//*****************************************************************//
//*****************************************************************//
cState::cState()
{
	reset();
}
//*****************************************************************//
//*****************************************************************//
double cState::get_r()
{
	double mag2 = x*x + y*y + z*z;

	if (mag2 == 0)
		return 0;

	return sqrt(mag2);
}
//*****************************************************************//
//*****************************************************************//
double cState::get_v()
{
	double mag2 = vx*vx + vy*vy + vz*vz;

	if (mag2 == 0)
		return 0;

	return sqrt(mag2);
}
//*****************************************************************//
//*****************************************************************//